<?php


interface prototype {
    function copy();
}

class Student implements prototype
{
    public $school;
    public $major;
    public $name;


    public function __construct($school, $major, $name)
    {
        $this->school = $school;
        $this->major = $major;
        $this->name = $name;
    }

    public function printInfo()
    {
        prinf("school = %s, majon = %s, name = %s", $this->school, $this->major, $this->name);
    }

    public function copy()
    {
        return clone $this;
    }
}

$student1 = new Student("清华大学", '计算机', '张三');
$student1->printInfo();

$student2 = $student1->copy();
$student2->name = "李四";
$student2->printInfo();